Matching Objects with Patterns

نویسندگان

  • Burak Emir
  • Martin Odersky
  • John Williams
چکیده

Data in object-oriented programming is organized in a hierarchy of classes. The problem of object-oriented pattern matching is how to explore this hierarchy from the outside. This usually involves classifying objects by their run-time type, accessing their members, or determining some other characteristic of a group of objects. In this paper we compare six different pattern matching techniques: object-oriented decomposition, visitors, type-tests/type-casts, typecase, case classes, and extractors. The techniques are compared on nine criteria related to conciseness, maintainability and performance. The paper introduces case classes and extractors as two new pattern-matching methods and shows that their combination works well for all of the established criteria.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Matching of Polygon Objects by Optimizing Geometric Criteria

Despite the semantic criteria, geometric criteria have different performances on polygon feature matching in different vector datasets. By using these criteria for measuring the similarity of two polygons in all matchings, the same results would not have been obtained. To achieve the best matching results, the determination of optimal geometric criteria for each dataset is considered necessary....

متن کامل

Adaptive Approximate Record Matching

Typographical data entry errors and incomplete documents, produce imperfect records in real world databases. These errors generate distinct records which belong to the same entity. The aim of Approximate Record Matching is to find multiple records which belong to an entity. In this paper, an algorithm for Approximate Record Matching is proposed that can be adapted automatically with input error...

متن کامل

OCL Pattern Matching

This paper proposes an extension to OCL that addresses a concern regarding the proliferation of navigation expressions that occur when expressing predicates over objects. Declarative patterns are introduced that can be used to match against object structures so that repeated variables reduce the need for lengthy repeated navigation expressions. Patterns provide the basis for a further contribut...

متن کامل

Adding Pattern Matching to Existing Object-Oriented Languages

While object-oriented languages are designed for information hiding and data encapsulation, intensive data manipulation often calls for pattern matching, one of the main features of functional programming languages. Pattern matching provides a concise way to describe specific structures or conditions of objects so that programmers can clearly identify and easily access the corresponding objects...

متن کامل

A Survey Paper on Trajectory Pattern Mining for Pattern Matching Query

Large amount information of moving objects on road network is being collected with the help of various recent technologies. The tracking of these moving objects on road networks is becoming important because of it's application in various areas. Classification has been used for classifying various kinds of data sets like graph, text documents. However, there is a lack of study on data like...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007